<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.pptree.service.*" %>
<%@ page import="com.pptree.service.impl.*" %>
<%@ page import="com.pptree.vo.*" %>
<%
	String id = request.getParameter("id");

	GenreService genreService = new GenreServiceImpl();
	int genreId = Integer.valueOf(id).intValue();
	
	boolean result = genreService.deleteCategory(genreId);
	if(result){
		String js = "<script>alert('删除新闻分类成功！');location.href='genreList.jsp'</script>";
		out.print(js);
	}
	else{
		String js = "<script>alert('删除新闻分类失败！\\n此新闻分类下有相关的新闻内容。');location.href='genreList.jsp'</script>";
		out.print(js);
	}
%>